import Vue from 'vue'
import Router from 'vue-router'
// import Layout from '@/components/layout'

Vue.use(Router)

const constantRoutes = [

  {
    path: '/',
    redirect: '/auth',
    hidden: true // 是否展示在侧边栏的菜单里
  },

  // 登录
  {
    path: '/login',
    name: 'Login',
    component: () => import('@/view/login'),
    hidden: true
  },
  // 404
  {
    path: '/404',
    name: '404',
    component: () => import('@/view/404'),
    hidden: true
  }
]

// 路由表
export default new Router({
  mode: 'hash',
  linkActiveClass: 'active',
  scrollBehavior: () => {
    return {x: 0, y: 0}
  },
  routes: constantRoutes
})
